How to get event parameters in a Xpage event Added by ~Mark Bubnizen on September 17, 2010 | Version 1
|
How to get information from the event parameters in a XPage event
|
When triggering a Event in an XPage the global object THIS will contain a XspEventEventHandler. We retrieve the parameters using a .getParameters() this will return a Java ArrayList The code below loops thru the arraylist and gets the value from the parameter name that matches the Key variable
var value=this.getParameters();
var tmp="";
var Key="MyParameter"; // Key contains the parameter name you want to retreve
for(x=0;x<value.size();x++){
if(value.get(x).getName()==Key){
tmp=value.get(x).getValue();
break;
}
}
requestScope.MyField=tmp; // Place the parameter data in the MyField requestScope vaiable
|